Repository navigation
fix(packaging): 载荷必须在签名装订之后才复制(修公证 Invalid) - #364
Merged
Merged
Conversation
…pled Apple rejected the first attempt: the payload copy inside the installer had "invalid signature", "no secure timestamp" and "hardened runtime not enabled", because it was copied before the updater was signed. Order is now fixed at both ends and enforced where it can be checked: sign+notarize+staple the updater and uninstaller, then stage the payload, then sign+notarize+staple the installer (sealing the payload), then build the DMG. stage-installer-payload.sh refuses payloads that lack a ticket or fail codesign verification, so a bad copy fails locally instead of at Apple; local previews must pass --unsigned-ok explicitly. Signed-off-by: wangzhizhou <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
第一次尝试的公证被判
Invalid,Apple 日志(这条日志正是刚加的notarize()打出来的)给了三条:原因:载荷是复制的二进制,而我在更新程序签名之前就复制了它 → 安装器里带着一份未签名副本。
修法(顺序两头卡死):
ci-sign.sh --app <更新程序> --also <卸载器>:签+公证+装订;stage-installer-payload.sh:把(验收 ZIP 里已装订的主机)+(已装订的更新程序)装成载荷;ci-sign.sh --app <安装器>:签+公证+装订安装器,把载荷封进签名;make-dmg.sh→ci-sign.sh --dmg。两次公证提交,脚本注释里写明顺序不可动。
新增守卫:
stage-installer-payload.sh拒绝缺Contents/CodeResources或codesign --verify失败的载荷(本机预览需显式--unsigned-ok),测试覆盖「未签名载荷必须被拒」与「工作流顺序:先签更新程序 → 装载荷 → 签安装器」。